const fs = require('fs')

const path =  require ('path')

const upLoad = (ctx) => {
    const { request } = ctx || {}
    // console.log(request)
    return ctx.body = {
        code: 200,
        data: null,
        msg: '成功'
    }
    // console.log(request)
    // const file = request.files.file; // 获取上传文件
    // return ctx.body = {
    //     code: 200,
    //     data: `http://${request.host}/${path.basename(file.filepath)}`,
    //     msg: '成功'
    // }
}

module.exports = [{
    request: 'post',
    path: '/api/upLoad',
    method: upLoad,
    permission: true
}]